//
//  MailWarnMePreferencesModule.m
//  MailWarnMe
//
//  Created by Chaim Peck on 3/6/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "MailWarnMePreferencesModule.h"


@implementation MailWarnMePreferencesModule
- (void) awakeFromNib {
	NSLog(@"MainWarnMe: Preferences awakeFromNib");
}

- (NSString *) preferencesNibName {
	return @"MailWarnMePreferences";
}

- (NSView *)preferencesView {
	NSLog(@"MailWarnMe: preferencesView");
	
	if (!view_preferences) {
		if([NSBundle loadNibNamed:[self preferencesNibName] owner:self])
			NSLog(@"MailWarnMe: loaded nib?");
		else
			NSLog(@"MailWarnMe: nib not loaded:%@",[self preferencesNibName]);
	}
	
	return view_preferences;
}

- (id) viewForPreferenceNamed:(NSString *)aName {
	NSLog(@"MailWarnMe: viewForPreferenceNamed:%@",aName);
	
	return [self preferencesView];
}

- (NSString *) titleForIdentifier:(NSString *)aName {
	NSLog(@"MailWarnMe: titleForIdentifier:%@",aName);
	return @"MailWarnMe";
}

- (NSImage *) imageForPreferenceNamed:(NSString *)aName {
	NSLog(@"MailWarnMe: imageForPreferenceNamed:%@",aName);
	return [NSImage imageNamed:aName];
}

- (NSSize) minSize {
	NSLog(@"MailWarnMe: minSize");
	return [[self preferencesView] frame].size;
}

- (BOOL) isResizable {
	return NO;
}

@end

